﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

// Reviewed
#pragma once

#include "GcmpModelInterface.h"
#include "IEventArgs.h"
namespace gcmp
{
    class IElement;
    class IElementsChangeEvent;

    /// \brief 元素对象改变事件参数接口类
    ///
    /// 访问元素对象改变事件参数
    class GCMP_MODEL_INTERFACE_EXPORT IElementsChangeEventArgs:public IEventArgs
    {
        DEFINE_CAST_DERIVED(gcmp::IElementsChangeEventArgs, gcmp::IEventArgs);
    public:
        /// \brief 得到所有有改变的元素指针
        /// \return 所有有改变的元素指针
        virtual const std::vector<const IElement*>& GetElements() const = 0;

        /// \brief 得到所有有改变的元素指针
        /// \return 所有有改变的元素指针
        virtual std::vector<IElement*> GetElementsFW() = 0;

        /// \brief 得到对应事务错误Id
        /// \return 事务错误Id
        virtual const Int64 GetTransactionErrorId() const = 0;
    };
}


